package com.xintoucloud.pbs.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotEmpty;

import org.springframework.format.annotation.DateTimeFormat;

@Entity@Table(name="p_partypayment")
public class PartyPayment {
	@Id@GeneratedValue(strategy=GenerationType.IDENTITY)
	private int partyPaymentId;
	
	@ManyToOne
	@JoinColumn(name="pid",unique=true,referencedColumnName="pid")
	private PartyMember partyMember;
	
	
	
	public PartyMember getPartyMember() {
		return partyMember;
	}
	public void setPartyMember(PartyMember partyMember) {
		this.partyMember = partyMember;
	}
	private BigDecimal amountPayable;
	private BigDecimal payAmount;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date limitedPaymentTime;
	@DateTimeFormat(pattern="yyyy-MM-dd")
	private Date paymentTime;
	public int getPartyPaymentId() {
		return partyPaymentId;
	}
	public void setPartyPaymentId(int partyPaymentId) {
		this.partyPaymentId = partyPaymentId;
	}
	public BigDecimal getAmountPayable() {
		return amountPayable;
	}
	public void setAmountPayable(BigDecimal amountPayable) {
		this.amountPayable = amountPayable;
	}
	public BigDecimal getPayAmount() {
		return payAmount;
	}
	public void setPayAmount(BigDecimal payAmount) {
		this.payAmount = payAmount;
	}
	public Date getLimitedPaymentTime() {
		return limitedPaymentTime;
	}
	public void setLimitedPaymentTime(Date limitedPaymentTime) {
		this.limitedPaymentTime = limitedPaymentTime;
	}
	public Date getPaymentTime() {
		return paymentTime;
	}
	public void setPaymentTime(Date paymentTime) {
		this.paymentTime = paymentTime;
	}
	
}
